﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Starfire3d.Data.States.UnitStates
{
    public class IdleUnit : BaseState<Unit>
    {
        public override void Enter(Unit entity)
        {
        }

        public override void Execute(Unit entity)
        {
            if (entity.IsDead)
            {
                entity.StateMachine.ChangeState(new DeadUnit());
                return;
            }

            if (DataStore.Store.Count > 1)
                entity.StateMachine.ChangeState(new AttackingUnit());
        }

        public override void Exit(Unit entity)
        {
        }

        public override string ToString()
        {
            return "Idle";
        }
    }
}
